package com.frank.oj.service.oj;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.frank.model.entity.discussion.Discussion;
import com.frank.model.entity.discussion.DiscussionReport;
import com.frank.model.entity.problem.Category;
import com.frank.oj.common.result.CommonResult;
import com.frank.oj.model.vo.DiscussionVO;

import java.util.List;

/**
 * @author frank
 * @Date 2024/4/7
 */
public interface DiscussionService {
    CommonResult<IPage<Discussion>> getDiscussionList(Integer limit, Integer currentPage, Integer categoryId, String pid, Boolean onlyMine, String keyword, Boolean admin);

    CommonResult<List<Category>> getDiscussionCategory();

    CommonResult<DiscussionVO> getDiscussionDetail(Integer did);

    CommonResult<Void> addDiscussion(Discussion discussion);

    CommonResult<Void> updateDiscussion(Discussion discussion);

    CommonResult<Void> removeDiscussion(Integer did);

    CommonResult<List<Category>> upsertDiscussionCategory(List<Category> categoryList);

    CommonResult<Void> addDiscussionLike(Integer did, Boolean toLike);

    CommonResult<Void> addDiscussionReport(DiscussionReport discussionReport);
}
